b8dcd3a7b66b85e8e7d9a75a8bb30e3100df0131,core/src/main/java/com/threerings/editor/swing/editors/ConfigEditor.java,ConfigEditor,didInit,#,71
Before Change
protected void didInit ()
{
add(new JLabel(getPropertyLabel() + ":"));
ConfigGroup<?>[] groups = _ctx.getConfigManager().getGroups(getMode());
if (groups.length == 0) {
log.warning("Missing groups for config editor.", "name", getMode());
return;
After Change
// look for a @Reference annotation
Reference ref = _property.getAnnotation(Reference.class);
ConfigGroup<?>[] groups;
if (ref != null) {
// @Reference is preferred
ConfigGroup<?> group = _ctx.getConfigManager().getGroup(ref.value());
if (group == null) {
log.warning("Missing valid type for Reference", "value", ref.value());
return;
}
groups = new ConfigGroup<?>[] { group };
} else {
// fall back to the old way: the mode argument of @Editable (boo hiss)
groups = _ctx.getConfigManager().getGroups(getMode());
if (groups.length == 0) {
log.warning("Missing groups for config editor.", "name", getMode());
return;